<template>
	<view class="wrapForm">
		<view class="bgLine"></view>
		<view class="wrapFormBody pL15 pR15 pT15">
				<u-parse :html="info?.content"></u-parse>
		</view>
	</view>
</template>

<script>
	import {getXy} from "@/api/userInterface/user.js"
	export default {
		data() {
			return {
				info:{}
			}
		},
		onLoad(e) {
			if(e.type=='YHXY'){
				uni.setNavigationBarTitle({
					title:"用户协议"
				})
			}else{
				uni.setNavigationBarTitle({
					title:"隐私协议"
				})
			}
			this.getXyOpt(e.type)
		},
		methods: {
			getXyOpt(v){
				getXy({agreement:v}).then(res=>{
					if(res.code==200){
						this.info=res.result
					}
				})
			}
		}
	}
</script>
<style lang="scss">
	page {
		
		/* #ifdef MP-WEIXIN */
		  height: 100%;
		/* #endif */
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.wrapForm{
		height: 100%;
		.wrapFormBody{
			margin-top: -30rpx;
			border-radius: 40rpx 40rpx 0 0;
			background: #fff;
		}
	}
	.bgLine{
		background-color: #E1EEFF;
		width: 100%;
		height: 60rpx;
	}
</style>
